﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="associateProject.aspx.cs" Inherits="Docsbox.Layouts.Docsbox.associateProject" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<style type="text/css">
    .field-label {
        margin: 5px 5px 5px 0px;
        font-size: 12px;
        line-height: 20px;
    }
    .field-data {
        
    }
    .docsbox-ddl {
        width: 250px;
        margin: 5px 5px 5px 0px;
    }
    .search-input-box {
            display: block;
            float: left;
            width: 400px;
            margin: 5px 5px 5px 0px;
    }
    .submit-control {
        margin: auto;
        padding: 5px 0px 5px 0px;
    }
</style>
<script type="text/javascript" src="/_layouts/Docsbox/jquery-latest.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        
    });
    
</script>
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    
    <script type="text/javascript">
    </script>
    <fieldset>
        <legend>Search Project</legend>
        <table>
            <tr>
                <td class="field-label">Office</td>
                <td class="field-data">
                    <asp:DropDownList ID="ddlOffices" CssClass="docsbox-ddl" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="field-label">Project Status</td>
                <td class="field-data">
                    <asp:DropDownList ID="ddlStatus" CssClass="docsbox-ddl" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="field-label">keyword</td>
                <td class="field-data">
                    <asp:TextBox ID="txtKeyword" CssClass="search-input-box" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="submit-control" colspan="2">
                    <asp:Button ID="btnSearch" OnClick="btnSearch_Cilck" OnClientClick="_spFormOnSubmitCalled=false;" runat="server" Text="Search" />
                </td>
            </tr>
        </table>
    </fieldset>
    
    <div>
        <fieldset id="searchReulstBox">
            <legend>Search Result</legend>
        <%--<SharePoint:ListViewByQuery runat="server" ID="projectsLVBQ"/>--%>
        <asp:GridView runat="server" ID="listGV" AllowSorting="True" DataKeyNames="ItemId" AutoGenerateColumns="False" >
            <Columns>
                <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <asp:CheckBox runat="server" ID="checkBoxSelected" Enabled="True"/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField Visible="False" DataField="ItemId" />
                <asp:BoundField DataField="MTFNumber" HeaderText="MTF No."/>
                <asp:BoundField DataField="FirstName" HeaderText="FirstName"/>
                <asp:BoundField DataField="Surname" HeaderText="Surname"/>
                <asp:BoundField DataField="RegistrationNumber" HeaderText="Registration No."/>
                <asp:BoundField DataField="Office" HeaderText="Office"/>
                <asp:BoundField DataField="Status" HeaderText="Status"/>
            </Columns>            
        </asp:GridView>
        <input id="selectedProject" type="hidden" runat="server"/>
        </fieldset>
    </div>
    <div>
        <asp:Button runat="server" ID="btnCancel" Text="Cancel" OnClientClick="javascript:window.frameElement.commitPopup();" />&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button runat="server" ID="btnSelect" OnClientClick="GetSelectedItem();" OnClick="btnSelect_Click" Text="Select"/>
    </div>
<h1>
    <asp:Label ID="lblDocumentName" runat="server" ></asp:Label>

</h1>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Docsbox - Associate Document to Project
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page
</asp:Content>
